<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class DoctorCashRecord extends Model
{
    protected $table = 'doctor_cash_record';//
    
    protected $appends = ['type_txt'];
    
    public function doctor(){
        return $this->belongsTo('App\Models\DoctorList','doctor_id','id');
    }
    
     /**
     * @return mixed
     */
    public function getTypeTxtAttribute(){
        return $this->type == 1 ? "提现佣金" : "获得佣金";
    } 

}
